<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>导航菜单</title>
  <style>
    .m-menu{
      width: 100%;
      height: 50px;
      background: #3778bc;
      display: flex;
    }
    .m-menu-item{
      width: 108px;
      height: 50px;
      background: #3778bc;
      cursor: pointer;
    }
    .m-menu-item .m-title{
      height: 50px;
      display: flex;
      justify-content: center;
      align-items: center;
      color: #ffffff;
      font-size: 15px;
    }
    .m-submenu .m-menu-item{
      width: 175px;
      background: #4470ab;
    }
    .m-submenu{
      display: none;
    }
    .m-menu-item:hover{
      background: #316ca9;
    }
    .m-menu-item:hover >.m-submenu{
      display: block;
    }
    .m-menu-item .m-menu-item .m-menu-item{
      position: relative;
      left: 175px;
      top: -50px
    }
    .m-menu-item >.m-submenu .m-title{
      font-size: 14px;
    }
    .m-menu-item >.m-submenu .m-submenu .m-title{
      font-size: 12px;
    }
    .m-submenu .m-menu-item:hover{
      background: #3e6eaa;
    }
  </style>
</head>
<body>
  <div class="m-menu">
    <div class="m-menu-item">
      <a class="m-title">首页</a>
    </div>
    <div class="m-menu-item">
      <a class="m-title">一级菜单1</a>
      <div class="m-submenu">
        <div class="m-menu-item">
          <a class="m-title">二级菜单11</a>
        </div>
        <div class="m-menu-item">
          <a class="m-title">二级菜单12</a>
        </div>
        <div class="m-menu-item">
          <a class="m-title">二级菜单13</a>
        </div>
      </div>
    </div>
    <div class="m-menu-item">
      <a class="m-title">一级菜单2</a>
      <div class="m-submenu">
        <div class="m-menu-item">
          <a class="m-title">二级菜单21</a>
        </div>
        <div class="m-menu-item">
          <a class="m-title">二级菜单22</a>
        </div>
        <div class="m-menu-item">
          <a class="m-title">二级菜单23</a>
        </div>
      </div>
    </div>
    <div class="m-menu-item">
      <a class="m-title">一级菜单3</a>
      <div class="m-submenu">
        <div class="m-menu-item">
          <a class="m-title">二级菜单31</a>
        </div>
        <div class="m-menu-item">
          <a class="m-title">二级菜单32</a>
          <div class="m-submenu">
            <div class="m-menu-item">
              <a class="m-title">三级菜单321</a>
            </div>
            <div class="m-menu-item">
              <a class="m-title">三级菜单322</a>
            </div>
          </div>
        </div>
        <div class="m-menu-item">
          <a class="m-title">二级菜单33</a>
          <div class="m-submenu">
            <div class="m-menu-item">
              <a class="m-title">三级菜单331</a>
            </div>
            <div class="m-menu-item">
              <a class="m-title">三级菜单332</a>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</body>
</html>